 <template>
  <div>
    <h1>{{ msg }}</h1>
    <div>
      <p>计算属性取值: {{ count }}</p>
    </div>
  </div>
</template> 

<script>
export default {
  name: "Counter",
  props: {
    msg: String,
  },
  computed: {
    count() {
      return this.$store.state.count;
    },
  },
};
</script>
